package com.quasar.hpatient.bean.home_inspection;

import android.graphics.Color;
import android.text.TextUtils;

import lib.quasar.widget.calendar.CalendarModel;

public class CalendarBean implements CalendarModel.SchemeModel {

    private String inspection_date;
    private String record_date;

    private String diagnose_sign;
    private String warn_sign;

    @Override
    public String getKey() {

        if (TextUtils.isEmpty(record_date) && TextUtils.isEmpty(inspection_date)) {
            return "";
        } else if (TextUtils.isEmpty(record_date)) {
            return inspection_date;
        } else {
            return record_date;
        }
    }

    @Override
    public boolean isSignSymbol() {
        return !TextUtils.isEmpty(warn_sign) && ("1".equals(warn_sign) || "0".equals(warn_sign));
    }

    @Override
    public int getSignSymbolColor() {
        if ("1".equals(warn_sign))
            return Color.parseColor("#ea5757");
        else
            return Color.parseColor("#13ad67");
    }

    @Override
    public boolean isSignText() {
        return !TextUtils.isEmpty(diagnose_sign) && "1".equals(diagnose_sign);
    }

    @Override
    public String getSignText() {
        return "诊";
    }

    public boolean isNull() {
        return TextUtils.isEmpty(diagnose_sign) && TextUtils.isEmpty(warn_sign);
    }

    public String getInspection_date() {
        return inspection_date;
    }

    public void setInspection_date(String inspection_date) {
        this.inspection_date = inspection_date;
    }

    public String getDiagnose_sign() {
        return diagnose_sign;
    }

    public void setDiagnose_sign(String diagnose_sign) {
        this.diagnose_sign = diagnose_sign;
    }

    public String getWarn_sign() {
        return warn_sign;
    }

    public void setWarn_sign(String warn_sign) {
        this.warn_sign = warn_sign;
    }
}